In computer programming, an application programming interface (API) is a set of routines, protocols, and tools for building software applications and services. An API expresses a software component in terms of its operations, inputs, outputs, and underlying types.
If an API call is synchronous, it means that code execution will block (or wait) for the API call to return before continuing. This means that until a response is returned by the API, the application will not execute any further, which could be perceived by the user as latency or performance lag.
Asynchronous API calls, on the other hand, do not block (or wait) for the API call to return from the server. Execution continues on in the program, and when the call returns from the server, a “callback” function is executed.
Thus, two main communication models exist for communication between a requester and a service (such as a web service for example): a synchronous communication model and an asynchronous communication model. The two models may not work in conjunction and, as a consequence, there may be no way for a synchronous requester to communicate with an asynchronous service, for example. It may therefore be desirable to cater for synchronous operation calls in an asynchronous system or communication model.
Systems have been devised which handle asynchronous operations or API calls, but they require modification of the synchronous operation or API call. They also require the use of proprietary operations and so do not cater for the re-use of conventional/existing operations.